/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Controller;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 *
 * @author Charly
 */
public class ReadFile {
	public static List<String> lire(String path){
		
		//lecture du fichier texte	
		try{
			InputStream ips=new FileInputStream(path); 
			InputStreamReader ipsr=new InputStreamReader(ips);
			BufferedReader br=new BufferedReader(ipsr);
			List<String> listCB = new ArrayList<>();
			String ligne;
			
			while ((ligne=br.readLine())!=null){
				listCB.add(ligne);
			}
			br.close();
			return listCB;
		}		
		catch (Exception e){
			System.out.println(e.toString());
			return null;
		}			
	}
}
